from bs4 import BeautifulSoup
import base64

if __name__ == '__main__':
    test_html = '<html><body><div><p class="test p">Hello bs4<span id="test">666</span></p></div>'
    soup_html = BeautifulSoup(test_html, 'html.parser')
    # print(soup_html, soup_html.select('p span'), soup_html.findAll(attrs={'class': 'test'}))
    # print(soup_html.select('.test')[0])
    test_str = b'binary\x00string'
    encode_str = base64.b64encode(test_str)
    print(encode_str)
    decode_str = base64.b64decode(encode_str)
    print(decode_str)
